import java.util.Arrays;
import java.util.List;

/**
 * Created by nanxin.cnx on 2015/7/31.
 */
public class Temp {
    public static void main(String[] args) {
        String s1 = "ENTR_PGUID\n" +
                "PARKING_PRICE\n" +
                "SAPA_ADCODE\n" +
                "SAPA_DIRADCODE\n" +
                "SAPA_ROUTENO\n" +
                "SAPA_RESTING\n" +
                "SAPA_SPECIALITY\n" +
                "SAPA_AUTOMAT\n" +
                "SAPA_PHYSICAL\n" +
                "SAPA_PHONEBOOTH\n" +
                "SAPA_GASSTATION\n" +
                "SAPA_NATURALGAS\n" +
                "SAPA_WC\n" +
                "SAPA_COFFEE\n" +
                "SAPA_DINING\n" +
                "SAPA_SHOP\n" +
                "SAPA_HOTEL\n" +
                "SAPA_REPAIR\n" +
                "SAPA_ATM\n" +
                "SAPA_DRUGSTORE\n" +
                "SAPA_SHOWER\n" +
                "AIRPORT_CODE\n" +
                "AIRPORT_AIRLINE\n" +
                "BUILDING_FLAG\n" +
                "AREA_FLAG\n" +
                "CONFI_CLASS\n" +
                "PRECISION\n" +
                "INFO_STATUS\n" +
                "DELETE_FLAG\n" +
                "DELETE_REASON\n" +
                "RE_DEL_POIID\n" +
                "ACTION\n" +
                "OPERATE_TIME\n" +
                "OPERATE_PERSON\n" +
                "CREATE_TIME\n" +
                "VERSION\n" +
                "CHANGE_SET_ID\n" +
                "SOURCE_VERSION\n" +
                "RESOURCE_TYPE\n" +
                "MATERIAL_ID\n" +
                "NAME_SRC\n" +
                "ADDR_SRC\n" +
                "TEL_SRC\n" +
                "COORD_SRC\n" +
                "POI_TYPE_SRC\n" +
                "NAME_TIME\n" +
                "ADDR_TIME\n" +
                "TEL_TIME\n" +
                "COORD_TIME\n" +
                "POI_TYPE_TIME\n" +
                "ISLOCK\n" +
                "BATCHID\n" +
                "VERIFY_PERSON\n" +
                "VERIFY_TIME\n" +
                "CREATE_PERSON\n" +
                "GOVERNMENT\n" +
                "ABBR\n" +
                "ABBR_ENG\n" +
                "ABBR_ENG_WAY\n" +
                "LM_TYPE\n" +
                "ANNO_TYPE\n" +
                "FILE_NAME\n" +
                "XID_FLAG\n" +
                "CREATE_FLAG\n" +
                "DISK_NAME\n" +
                "DISK_TIME\n" +
                "BTQ_FLAG\n" +
                "PLUS_TYPE\n" +
                "PLUS_LOCK\n" +
                "COS_FLAG\n" +
                "OLD_X\n" +
                "OLD_Y\n" +
                "SCENICR_ID\n" +
                "UPLOAD_TIME\n" +
                "LM_SCALEMASK\n" +
                "D_MESHID\n" +
                "CSTYPE\n" +
                "CSCF\n" +
                "SP_FLAG\n" +
                "PARKING_PRICE_PICID\n" +
                "IS_SPECIAL\n" +
                "GUID\n" +
                "DB_FLAG\n" +
                "POIID\n" +
                "PCS_POIID\n" +
                "XID\n" +
                "COIID\n" +
                "MESHID\n" +
                "MESH_POIID\n" +
                "ONLY_INPCS\n" +
                "NAME\n" +
                "NAME_ENG\n" +
                "NAME_ENG_WAY\n" +
                "ALIAS_ENG\n" +
                "ALIAS_ENG_WAY\n" +
                "ALIAS\n" +
                "ADDR\n" +
                "ADDR_TYPE\n" +
                "ADDR_ENG\n" +
                "ADDR_ENG_WAY\n" +
                "ADDR_OTHER\n" +
                "GEOM\n" +
                "GEO_PRECISION\n" +
                "X_ENTR\n" +
                "Y_ENTR\n" +
                "ENTR_ROAD\n" +
                "POI_TYPE\n" +
                "SUB_TYPE\n" +
                "OTHER_TYPE\n" +
                "DISTRICT\n" +
                "TEL\n" +
                "MOBILE\n" +
                "FREE_TEL\n" +
                "SERV_TEL\n" +
                "FAX\n" +
                "URL\n" +
                "EMAIL\n" +
                "POSTCODE\n" +
                "ADCODE\n" +
                "ADCODE_VANITY\n" +
                "PICID\n" +
                "PIC_QUALITY\n" +
                "OPEN_TIME\n" +
                "MAX_FLOOR\n" +
                "FLOOR\n" +
                "SCALE\n" +
                "BRAND\n" +
                "BUSINESS_BRAND\n" +
                "OIL_NO\n" +
                "PARKING_FLAG\n" +
                "NAVI_GATE_TYPE\n" +
                "SPECIAL_OBJ\n" +
                "LM_FILE\n" +
                "OBJ_ANGLE\n" +
                "OBJ_SCALE\n" +
                "INTRO\n" +
                "INTRO_ENG\n" +
                "NATIONAL_IMPT\n" +
                "RANK\n" +
                "PRICE_AVG\n" +
                "PAY_TYPE\n" +
                "CHARACTERISTIC\n" +
                "NETWORK_PRICE\n" +
                "RECOMMEND\n" +
                "SERVICE\n" +
                "TRAFFIC\n" +
                "TIP\n" +
                "PRICE\n" +
                "PRO_OPEN_TIME\n" +
                "ANNO_NAME\n" +
                "ANNO_NAME_ENG\n" +
                "ANNO_ENG_WAY\n" +
                "ANNO_SCALEMASK\n" +
                "PARKING_TYPE\n" +
                "PARKING_NUM\n" +
                "PARKING_LENGTH\n" +
                "PARKING_WIDTH\n" +
                "PARKING_HEIGHT\n";
        String s2 = "ENTR_PGUID,\n" +
                "   PRECISION,\n" +
                "   INFO_STATUS,\n" +
                "   DELETE_FLAG,\n" +
                "   DELETE_REASON,\n" +
                "   RE_DEL_POIID,\n" +
                "   ACTION,\n" +
                "   OPERATE_TIME,\n" +
                "   OPERATE_PERSON,\n" +
                "   CREATE_TIME,\n" +
                "   VERSION,\n" +
                "   CHANGE_SET_ID,\n" +
                "   SOURCE_VERSION,\n" +
                "   RESOURCE_TYPE,\n" +
                "   MATERIAL_ID,\n" +
                "   NAME_SRC,\n" +
                "   ADDR_SRC,\n" +
                "   TEL_SRC,\n" +
                "   COORD_SRC,\n" +
                "   POI_TYPE_SRC,\n" +
                "   NAME_TIME,\n" +
                "   ADDR_TIME,\n" +
                "   TEL_TIME,\n" +
                "   COORD_TIME,\n" +
                "   POI_TYPE_TIME,\n" +
                "   ISLOCK,\n" +
                "   VERIFY_PERSON,\n" +
                "   VERIFY_TIME,\n" +
                "   CREATE_PERSON,\n" +
                "   GOVERNMENT,\n" +
                "   ABBR,\n" +
                "   ABBR_ENG,\n" +
                "   ABBR_ENG_WAY,\n" +
                "   LM_TYPE,\n" +
                "   ANNO_TYPE,\n" +
                "   FILE_NAME,\n" +
                "   XID_FLAG,\n" +
                "   CREATE_FLAG,\n" +
                "   DISK_NAME,\n" +
                "   DISK_TIME,\n" +
                "   BTQ_FLAG,\n" +
                "   PLUS_TYPE,\n" +
                "   PLUS_LOCK,\n" +
                "   COS_FLAG,\n" +
                "   OLD_X,\n" +
                "   OLD_Y,\n" +
                "   SCENICR_ID,\n" +
                "   LM_SCALEMASK,\n" +
                "   D_MESHID,\n" +
                "   CSTYPE,\n" +
                "   CSCF,\n" +
                "   PARKING_PRICE_PICID,\n" +
                "   SP_FLAG,\n" +
                "   IS_SPECIAL,\n" +
                "   GUID,\n" +
                "   DB_FLAG,\n" +
                "   POIID,\n" +
                "   PCS_POIID,\n" +
                "   XID,\n" +
                "   COIID,\n" +
                "   MESHID,\n" +
                "   MESH_POIID,\n" +
                "   ONLY_INPCS,\n" +
                "   NAME,\n" +
                "   NAME_ENG,\n" +
                "   NAME_ENG_WAY,\n" +
                "   ALIAS_ENG,\n" +
                "   ALIAS_ENG_WAY,\n" +
                "   ALIAS,\n" +
                "   ADDR,\n" +
                "   ADDR_TYPE,\n" +
                "   ADDR_ENG,\n" +
                "   ADDR_ENG_WAY,\n" +
                "   ADDR_OTHER,\n" +
                "   X_COORD,\n" +
                "   Y_COORD,\n" +
                "   GEO_PRECISION,\n" +
                "   X_ENTR,\n" +
                "   Y_ENTR,\n" +
                "   ENTR_ROAD,\n" +
                "   POI_TYPE,\n" +
                "   SUB_TYPE,\n" +
                "   OTHER_TYPE,\n" +
                "   DISTRICT,\n" +
                "   TEL,\n" +
                "   MOBILE,\n" +
                "   FREE_TEL,\n" +
                "   SERV_TEL,\n" +
                "   FAX,\n" +
                "   URL,\n" +
                "   EMAIL,\n" +
                "   POSTCODE,\n" +
                "   ADCODE,\n" +
                "   ADCODE_VANITY,\n" +
                "   PICID,\n" +
                "   PIC_QUALITY,\n" +
                "   OPEN_TIME,\n" +
                "   MAX_FLOOR,\n" +
                "   FLOOR,\n" +
                "   SCALE,\n" +
                "   BRAND,\n" +
                "   BUSINESS_BRAND,\n" +
                "   OIL_NO,\n" +
                "   PARKING_FLAG,\n" +
                "   NAVI_GATE_TYPE,\n" +
                "   SPECIAL_OBJ,\n" +
                "   LM_FILE,\n" +
                "   OBJ_ANGLE,\n" +
                "   OBJ_SCALE,\n" +
                "   INTRO,\n" +
                "   INTRO_ENG,\n" +
                "   NATIONAL_IMPT,\n" +
                "   RANK,\n" +
                "   PRICE_AVG,\n" +
                "   PAY_TYPE,\n" +
                "   CHARACTERISTIC,\n" +
                "   NETWORK_PRICE,\n" +
                "   RECOMMEND,\n" +
                "   SERVICE,\n" +
                "   TRAFFIC,\n" +
                "   TIP,\n" +
                "   PRICE,\n" +
                "   PRO_OPEN_TIME,\n" +
                "   ANNO_NAME,\n" +
                "   ANNO_NAME_ENG,\n" +
                "   ANNO_ENG_WAY,\n" +
                "   ANNO_SCALEMASK,\n" +
                "   PARKING_TYPE,\n" +
                "   PARKING_NUM,\n" +
                "   PARKING_LENGTH,\n" +
                "   PARKING_WIDTH,\n" +
                "   PARKING_HEIGHT,\n" +
                "   PARKING_PRICE,\n" +
                "   SAPA_ADCODE,\n" +
                "   SAPA_DIRADCODE,\n" +
                "   SAPA_ROUTENO,\n" +
                "   SAPA_RESTING,\n" +
                "   SAPA_SPECIALITY,\n" +
                "   SAPA_AUTOMAT,\n" +
                "   SAPA_PHYSICAL,\n" +
                "   SAPA_PHONEBOOTH,\n" +
                "   SAPA_GASSTATION,\n" +
                "   SAPA_NATURALGAS,\n" +
                "   SAPA_WC,\n" +
                "   SAPA_COFFEE,\n" +
                "   SAPA_DINING,\n" +
                "   SAPA_SHOP,\n" +
                "   SAPA_HOTEL,\n" +
                "   SAPA_REPAIR,\n" +
                "   SAPA_ATM,\n" +
                "   SAPA_DRUGSTORE,\n" +
                "   SAPA_SHOWER,\n" +
                "   AIRPORT_CODE,\n" +
                "   AIRPORT_AIRLINE,\n" +
                "   BUILDING_FLAG,\n" +
                "   AREA_FLAG,\n" +
                "   CONFI_CLASS,\n" +
                "   BATCHID ";

        String[] ss_sqlite = s2.split(",\n");
        String[] ss_ora = s1.split("\n");

        List<String> list_sqlite = Arrays.asList(ss_sqlite);
        List<String> list_ora = Arrays.asList(ss_ora);
        for (int i = 0; i < list_sqlite.size(); i++) {
            list_sqlite.set(i, list_sqlite.get(i).trim());
        }
        for (int i = 0; i < list_ora.size(); i++) {
            list_ora.set(i, list_ora.get(i).trim());
        }

        System.out.println("in  ora , not in sqlite:");
        for (String s : list_ora) {
            if (!list_sqlite.contains(s)) {
                System.out.println(s);
            }
        }
        System.out.println("in  sqlite , not in ora:");
        for (String s : list_sqlite) {
            if (!list_ora.contains(s)) {
                System.out.println(s);
            }
        }
    }


    /**
     * 半角转全角
     * @param input String.
     * @return 全角字符串.
     */
    public static String ToSBC(String input) {
        char c[] = input.toCharArray();
        for (int i = 0; i < c.length; i++) {
            if (c[i] == ' ') {
                c[i] = '\u3000';
            } else if (c[i] < '\177') {
                c[i] = (char) (c[i] + 65248);

            }
        }
        return new String(c);
    }

    /**
     * 全角转半角
     * @param input String.
     * @return 半角字符串
     */
    public static String ToDBC(String input) {


        char c[] = input.toCharArray();
        for (int i = 0; i < c.length; i++) {
            if (c[i] == '\u3000') {
                c[i] = ' ';
            } else if (c[i] > '\uFF00' && c[i] < '\uFF5F') {
                c[i] = (char) (c[i] - 65248);

            }
        }
        String returnString = new String(c);

        return returnString;
    }
}
